# Maintainer: kpcyrd <git@rxv.cc>
pkgname=cargo2junit
pkgver=0.1.13
pkgrel=0
pkgdesc="Converts cargo's json output to JUnit XML"
url="https://github.com/johnterickson/cargo2junit"
arch="all"
license="MIT"
makedepends="
	cargo
	cargo-auditable
	"
source="https://github.com/johnterickson/cargo2junit/archive/refs/tags/v$pkgver/cargo2junit-$pkgver.tar.gz"
options="net"

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/cargo2junit \
		-t "$pkgdir"/usr/bin
	install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}

sha512sums="
c8ae7a97204699992ad51603c699742cc96ee4782946e99834b2d6de58d80777f68c213a3ac7999cc77eae71b92b10763a749d2cfa2648ec73cbf0d78fd1d4a2  cargo2junit-0.1.13.tar.gz
"
